require 'qt'
require 'ur'
require 'base64'
require 'resources'

class Ui_Form <Qt::Widget
    attr_reader :verticalLayout_2
    attr_reader :vboxLayout
    attr_reader :tabWidget
    attr_reader :tab
    attr_reader :horizontalLayout_3
    attr_reader :hboxLayout
    attr_reader :vboxLayout1
    attr_reader :hboxLayout1
    attr_reader :vboxLayout2
    attr_reader :label_2
    attr_reader :label
    attr_reader :vboxLayout3
    attr_reader :uname
    attr_reader :passwd
    attr_reader :hboxLayout2
    attr_reader :label_3
    attr_reader :comboBox_style
    attr_reader :spacerItem
    attr_reader :hboxLayout3
    attr_reader :pushButton_login
    attr_reader :pushButton_logout
    attr_reader :checkBox_autolog
    attr_reader :spacerItem1
    attr_reader :vboxLayout4
    attr_reader :radioButton_in
    attr_reader :radioButton_out
    attr_reader :radioButton_gucas
    attr_reader :comboBox_method
    attr_reader :label_success
    attr_reader :tab_2
    attr_reader :messagelist
    attr_reader :page
    attr_reader :verticalLayout
    attr_reader :vboxLayout5
    attr_reader :pushButton_netstatus
    attr_reader :pushButton_person_info
    attr_reader :page_2
    attr_reader :verticalLayout_4
    attr_reader :vboxLayout6
    attr_reader :pushButton_passchange
    attr_reader :pushButton_amountlim
    attr_reader :stackedWidget_message
    attr_reader :page_0
    attr_reader :verticalLayout_5
    attr_reader :vboxLayout7
    attr_reader :dial_inmount
    attr_reader :label_inmountleft
    attr_reader :verticalLayout_6
    attr_reader :vboxLayout8
    attr_reader :dial_outmount
    attr_reader :label_outmountleft
    attr_reader :label_money
    attr_reader :page_1
    attr_reader :textEdit_person_info
    attr_reader :page_3
    attr_reader :verticalLayout_7
    attr_reader :vboxLayout9
    attr_reader :lineEdit_oldpass
    attr_reader :lineEdit_newpass
    attr_reader :lineEdit_confirm
    attr_reader :verticalLayout_8
    attr_reader :vboxLayout10
    attr_reader :label_6
    attr_reader :label_8
    attr_reader :label_7
    attr_reader :pushButton_changepass
    attr_reader :pushButton_reset
    attr_reader :page_4
    attr_reader :verticalLayout_9
    attr_reader :vboxLayout11
    attr_reader :horizontalSlider_inmount
    attr_reader :horizontalSlider_outmount
    attr_reader :verticalLayout_10
    attr_reader :vboxLayout12
    attr_reader :label_10
    attr_reader :label_9
    attr_reader :verticalLayout_11
    attr_reader :vboxLayout13
    attr_reader :doubleSpinBox_inmount
    attr_reader :doubleSpinBox_outmount
    attr_reader :checkBox_uselim

    def setupUi(form)
    if form.objectName.nil?
        form.objectName = "form"
    end
    form.resize(437, 180)
    @font = Qt::Font.new
    @font.family = "\346\226\260\345\256\213\344\275\223"
    form.font = @font
    icon = Qt::Icon.new(":/pic/pagecurl.png")
    form.windowIcon = icon
    @verticalLayout_2 = Qt::Widget.new(form)
    @verticalLayout_2.objectName = "verticalLayout_2"
    @verticalLayout_2.geometry = Qt::Rect.new(10, 10, 421, 161)
    @vboxLayout = Qt::VBoxLayout.new(@verticalLayout_2)
    @vboxLayout.objectName = "vboxLayout"
    @vboxLayout.setContentsMargins(0, 0, 0, 0)
    @tabWidget = Qt::TabWidget.new(@verticalLayout_2)
    @tabWidget.objectName = "tabWidget"
    @tabWidget.tabShape = Qt::TabWidget::Rounded
    @tab = Qt::Widget.new()
    @tab.objectName = "tab"
    @horizontalLayout_3 = Qt::Widget.new(@tab)
    @horizontalLayout_3.objectName = "horizontalLayout_3"
    @horizontalLayout_3.geometry = Qt::Rect.new(20, 10, 381, 110)
    @hboxLayout = Qt::HBoxLayout.new(@horizontalLayout_3)
    @hboxLayout.objectName = "hboxLayout"
    @hboxLayout.setContentsMargins(0, 0, 0, 0)
    @vboxLayout1 = Qt::VBoxLayout.new()
    @vboxLayout1.objectName = "vboxLayout1"
    @hboxLayout1 = Qt::HBoxLayout.new()
    @hboxLayout1.objectName = "hboxLayout1"
    @vboxLayout2 = Qt::VBoxLayout.new()
    @vboxLayout2.objectName = "vboxLayout2"
    @label_2 = Qt::Label.new(@horizontalLayout_3)
    @label_2.objectName = "label_2"

    @vboxLayout2.addWidget(@label_2)

    @label = Qt::Label.new(@horizontalLayout_3)
    @label.objectName = "label"

    @vboxLayout2.addWidget(@label)


    @hboxLayout1.addLayout(@vboxLayout2)

    @vboxLayout3 = Qt::VBoxLayout.new()
    @vboxLayout3.objectName = "vboxLayout3"
    @uname = Qt::LineEdit.new(@horizontalLayout_3)
    @uname.objectName = "uname"

    @vboxLayout3.addWidget(@uname)

    @passwd = Qt::LineEdit.new(@horizontalLayout_3)
    @passwd.objectName = "passwd"

    @vboxLayout3.addWidget(@passwd)


    @hboxLayout1.addLayout(@vboxLayout3)


    @vboxLayout1.addLayout(@hboxLayout1)

    @hboxLayout2 = Qt::HBoxLayout.new()
    @hboxLayout2.objectName = "hboxLayout2"
    @label_3 = Qt::Label.new(@horizontalLayout_3)
    @label_3.objectName = "label_3"

    @hboxLayout2.addWidget(@label_3)

    @comboBox_style = Qt::ComboBox.new(@horizontalLayout_3)
    @comboBox_style.objectName = "comboBox_style"

    @hboxLayout2.addWidget(@comboBox_style)

    @spacerItem = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)

    @hboxLayout2.addItem(@spacerItem)


    @vboxLayout1.addLayout(@hboxLayout2)

    @hboxLayout3 = Qt::HBoxLayout.new()
    @hboxLayout3.objectName = "hboxLayout3"
    @pushButton_login = Qt::PushButton.new(@horizontalLayout_3)
    @pushButton_login.objectName = "pushButton_login"
    icon1 = Qt::Icon.new(":/pic/heart.svg")
    @pushButton_login.icon = icon1

    @hboxLayout3.addWidget(@pushButton_login)

    @pushButton_logout = Qt::PushButton.new(@horizontalLayout_3)
    @pushButton_logout.objectName = "pushButton_logout"
    icon2 = Qt::Icon.new(":/pic/bad.svg")
    @pushButton_logout.icon = icon2

    @hboxLayout3.addWidget(@pushButton_logout)

    @checkBox_autolog = Qt::CheckBox.new(@horizontalLayout_3)
    @checkBox_autolog.objectName = "checkBox_autolog"

    @hboxLayout3.addWidget(@checkBox_autolog)


    @vboxLayout1.addLayout(@hboxLayout3)


    @hboxLayout.addLayout(@vboxLayout1)

    @spacerItem1 = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)

    @hboxLayout.addItem(@spacerItem1)

    @vboxLayout4 = Qt::VBoxLayout.new()
    @vboxLayout4.objectName = "vboxLayout4"
    @radioButton_in = Qt::RadioButton.new(@horizontalLayout_3)
    @radioButton_in.objectName = "radioButton_in"
    icon3 = Qt::Icon.new(":/pic/house.png")
    @radioButton_in.icon = icon3

    @vboxLayout4.addWidget(@radioButton_in)

    @radioButton_out = Qt::RadioButton.new(@horizontalLayout_3)
    @radioButton_out.objectName = "radioButton_out"
    icon4 = Qt::Icon.new(":/pic/boat.png")
    @radioButton_out.icon = icon4

    @vboxLayout4.addWidget(@radioButton_out)

    @radioButton_gucas = Qt::RadioButton.new(@horizontalLayout_3)
    @radioButton_gucas.objectName = "radioButton_gucas"
    icon5 = Qt::Icon.new(":/pic/car.png")
    @radioButton_gucas.icon = icon5

    @vboxLayout4.addWidget(@radioButton_gucas)

    @comboBox_method = Qt::ComboBox.new(@horizontalLayout_3)
    @comboBox_method.objectName = "comboBox_method"

    @vboxLayout4.addWidget(@comboBox_method)


    @hboxLayout.addLayout(@vboxLayout4)

    @label_success = Qt::Label.new(@tab)
    @label_success.objectName = "label_success"
    @label_success.enabled = true
    @label_success.geometry = Qt::Rect.new(310, 120, 91, 16)
    @tabWidget.addTab(@tab, Qt::Application.translate("Form", "Login", nil, Qt::Application::UnicodeUTF8))
    @tab_2 = Qt::Widget.new()
    @tab_2.objectName = "tab_2"
    @messagelist = Qt::ToolBox.new(@tab_2)
    @messagelist.objectName = "messagelist"
    @messagelist.geometry = Qt::Rect.new(10, 10, 101, 120)
    @messagelist.cursor = Qt::Cursor.new(Qt::PointingHandCursor)
    @messagelist.frameShape = Qt::Frame::NoFrame
    @messagelist.frameShadow = Qt::Frame::Plain
    @page = Qt::Widget.new()
    @page.objectName = "page"
    @page.geometry = Qt::Rect.new(0, 0, 101, 60)
    @verticalLayout = Qt::Widget.new(@page)
    @verticalLayout.objectName = "verticalLayout"
    @verticalLayout.geometry = Qt::Rect.new(0, 0, 101, 56)
    @vboxLayout5 = Qt::VBoxLayout.new(@verticalLayout)
    @vboxLayout5.objectName = "vboxLayout5"
    @vboxLayout5.setContentsMargins(0, 0, 0, 0)
    @pushButton_netstatus = Qt::PushButton.new(@verticalLayout)
    @pushButton_netstatus.objectName = "pushButton_netstatus"
    @pushButton_netstatus.cursor = Qt::Cursor.new(Qt::PointingHandCursor)
    icon6 = Qt::Icon.new(":/pic/qtopia_48x48.png")
    @pushButton_netstatus.icon = icon6

    @vboxLayout5.addWidget(@pushButton_netstatus)

    @pushButton_person_info = Qt::PushButton.new(@verticalLayout)
    @pushButton_person_info.objectName = "pushButton_person_info"
    icon7 = Qt::Icon.new(":/pic/green.png")
    @pushButton_person_info.icon = icon7

    @vboxLayout5.addWidget(@pushButton_person_info)

    icon8 = Qt::Icon.new(":/pic/slider_thumb_off.png")
    @messagelist.addItem(@page, icon8, Qt::Application.translate("Form", "BINFO", nil, Qt::Application::UnicodeUTF8))
    @page_2 = Qt::Widget.new()
    @page_2.objectName = "page_2"
    @page_2.geometry = Qt::Rect.new(0, 0, 101, 60)
    @verticalLayout_4 = Qt::Widget.new(@page_2)
    @verticalLayout_4.objectName = "verticalLayout_4"
    @verticalLayout_4.geometry = Qt::Rect.new(0, 0, 101, 56)
    @vboxLayout6 = Qt::VBoxLayout.new(@verticalLayout_4)
    @vboxLayout6.objectName = "vboxLayout6"
    @vboxLayout6.setContentsMargins(0, 0, 0, 0)
    @pushButton_passchange = Qt::PushButton.new(@verticalLayout_4)
    @pushButton_passchange.objectName = "pushButton_passchange"
    icon9 = Qt::Icon.new(":/pic/interview.png")
    @pushButton_passchange.icon = icon9

    @vboxLayout6.addWidget(@pushButton_passchange)

    @pushButton_amountlim = Qt::PushButton.new(@verticalLayout_4)
    @pushButton_amountlim.objectName = "pushButton_amountlim"
    icon10 = Qt::Icon.new(":/pic/services.png")
    @pushButton_amountlim.icon = icon10

    @vboxLayout6.addWidget(@pushButton_amountlim)

    icon11 = Qt::Icon.new(":/pic/spheres.svg")
    @messagelist.addItem(@page_2, icon11, Qt::Application.translate("Form", "AOPT", nil, Qt::Application::UnicodeUTF8))
    @stackedWidget_message = Qt::StackedWidget.new(@tab_2)
    @stackedWidget_message.objectName = "stackedWidget_message"
    @stackedWidget_message.geometry = Qt::Rect.new(120, 0, 281, 131)
    @page_0 = Qt::Widget.new()
    @page_0.objectName = "page_0"
    @verticalLayout_5 = Qt::Widget.new(@page_0)
    @verticalLayout_5.objectName = "verticalLayout_5"
    @verticalLayout_5.geometry = Qt::Rect.new(0, 0, 131, 81)
    @vboxLayout7 = Qt::VBoxLayout.new(@verticalLayout_5)
    @vboxLayout7.objectName = "vboxLayout7"
    @vboxLayout7.setContentsMargins(0, 0, 0, 0)
    @dial_inmount = Qt::Dial.new(@verticalLayout_5)
    @dial_inmount.objectName = "dial_inmount"
    @dial_inmount.enabled = false
    @dial_inmount.maximum = 1000
    @dial_inmount.orientation = Qt::Horizontal

    @vboxLayout7.addWidget(@dial_inmount)

    @label_inmountleft = Qt::Label.new(@verticalLayout_5)
    @label_inmountleft.objectName = "label_inmountleft"

    @vboxLayout7.addWidget(@label_inmountleft)

    @verticalLayout_6 = Qt::Widget.new(@page_0)
    @verticalLayout_6.objectName = "verticalLayout_6"
    @verticalLayout_6.geometry = Qt::Rect.new(130, 0, 141, 81)
    @vboxLayout8 = Qt::VBoxLayout.new(@verticalLayout_6)
    @vboxLayout8.objectName = "vboxLayout8"
    @vboxLayout8.setContentsMargins(0, 0, 0, 0)
    @dial_outmount = Qt::Dial.new(@verticalLayout_6)
    @dial_outmount.objectName = "dial_outmount"
    @dial_outmount.maximum = 2000

    @vboxLayout8.addWidget(@dial_outmount)

    @label_outmountleft = Qt::Label.new(@verticalLayout_6)
    @label_outmountleft.objectName = "label_outmountleft"

    @vboxLayout8.addWidget(@label_outmountleft)

    @label_money = Qt::Label.new(@page_0)
    @label_money.objectName = "label_money"
    @label_money.geometry = Qt::Rect.new(0, 90, 271, 41)
    @stackedWidget_message.addWidget(@page_0)
    @page_1 = Qt::Widget.new()
    @page_1.objectName = "page_1"
    @textEdit_person_info = Qt::TextEdit.new(@page_1)
    @textEdit_person_info.objectName = "textEdit_person_info"
    @textEdit_person_info.geometry = Qt::Rect.new(20, 10, 261, 111)
    @stackedWidget_message.addWidget(@page_1)
    @page_3 = Qt::Widget.new()
    @page_3.objectName = "page_3"
    @verticalLayout_7 = Qt::Widget.new(@page_3)
    @verticalLayout_7.objectName = "verticalLayout_7"
    @verticalLayout_7.geometry = Qt::Rect.new(110, 10, 121, 77)
    @vboxLayout9 = Qt::VBoxLayout.new(@verticalLayout_7)
    @vboxLayout9.objectName = "vboxLayout9"
    @vboxLayout9.setContentsMargins(0, 0, 0, 0)
    @lineEdit_oldpass = Qt::LineEdit.new(@verticalLayout_7)
    @lineEdit_oldpass.objectName = "lineEdit_oldpass"

    @vboxLayout9.addWidget(@lineEdit_oldpass)

    @lineEdit_newpass = Qt::LineEdit.new(@verticalLayout_7)
    @lineEdit_newpass.objectName = "lineEdit_newpass"

    @vboxLayout9.addWidget(@lineEdit_newpass)

    @lineEdit_confirm = Qt::LineEdit.new(@verticalLayout_7)
    @lineEdit_confirm.objectName = "lineEdit_confirm"

    @vboxLayout9.addWidget(@lineEdit_confirm)

    @verticalLayout_8 = Qt::Widget.new(@page_3)
    @verticalLayout_8.objectName = "verticalLayout_8"
    @verticalLayout_8.geometry = Qt::Rect.new(40, 10, 56, 80)
    @vboxLayout10 = Qt::VBoxLayout.new(@verticalLayout_8)
    @vboxLayout10.objectName = "vboxLayout10"
    @vboxLayout10.setContentsMargins(0, 0, 0, 0)
    @label_6 = Qt::Label.new(@verticalLayout_8)
    @label_6.objectName = "label_6"

    @vboxLayout10.addWidget(@label_6)

    @label_8 = Qt::Label.new(@verticalLayout_8)
    @label_8.objectName = "label_8"

    @vboxLayout10.addWidget(@label_8)

    @label_7 = Qt::Label.new(@verticalLayout_8)
    @label_7.objectName = "label_7"

    @vboxLayout10.addWidget(@label_7)

    @pushButton_changepass = Qt::PushButton.new(@page_3)
    @pushButton_changepass.objectName = "pushButton_changepass"
    @pushButton_changepass.geometry = Qt::Rect.new(40, 100, 75, 23)
    @pushButton_reset = Qt::PushButton.new(@page_3)
    @pushButton_reset.objectName = "pushButton_reset"
    @pushButton_reset.geometry = Qt::Rect.new(120, 100, 75, 23)
    @stackedWidget_message.addWidget(@page_3)
    @page_4 = Qt::Widget.new()
    @page_4.objectName = "page_4"
    @verticalLayout_9 = Qt::Widget.new(@page_4)
    @verticalLayout_9.objectName = "verticalLayout_9"
    @verticalLayout_9.geometry = Qt::Rect.new(50, 20, 141, 80)
    @vboxLayout11 = Qt::VBoxLayout.new(@verticalLayout_9)
    @vboxLayout11.objectName = "vboxLayout11"
    @vboxLayout11.setContentsMargins(0, 0, 0, 0)
    @horizontalSlider_inmount = Qt::Slider.new(@verticalLayout_9)
    @horizontalSlider_inmount.objectName = "horizontalSlider_inmount"
    @horizontalSlider_inmount.orientation = Qt::Horizontal

    @vboxLayout11.addWidget(@horizontalSlider_inmount)

    @horizontalSlider_outmount = Qt::Slider.new(@verticalLayout_9)
    @horizontalSlider_outmount.objectName = "horizontalSlider_outmount"
    @horizontalSlider_outmount.orientation = Qt::Horizontal

    @vboxLayout11.addWidget(@horizontalSlider_outmount)

    @verticalLayout_10 = Qt::Widget.new(@page_4)
    @verticalLayout_10.objectName = "verticalLayout_10"
    @verticalLayout_10.geometry = Qt::Rect.new(20, 20, 26, 80)
    @vboxLayout12 = Qt::VBoxLayout.new(@verticalLayout_10)
    @vboxLayout12.objectName = "vboxLayout12"
    @vboxLayout12.setContentsMargins(0, 0, 0, 0)
    @label_10 = Qt::Label.new(@verticalLayout_10)
    @label_10.objectName = "label_10"

    @vboxLayout12.addWidget(@label_10)

    @label_9 = Qt::Label.new(@verticalLayout_10)
    @label_9.objectName = "label_9"

    @vboxLayout12.addWidget(@label_9)

    @verticalLayout_11 = Qt::Widget.new(@page_4)
    @verticalLayout_11.objectName = "verticalLayout_11"
    @verticalLayout_11.geometry = Qt::Rect.new(200, 20, 71, 80)
    @vboxLayout13 = Qt::VBoxLayout.new(@verticalLayout_11)
    @vboxLayout13.objectName = "vboxLayout13"
    @vboxLayout13.setContentsMargins(0, 0, 0, 0)
    @doubleSpinBox_inmount = Qt::DoubleSpinBox.new(@verticalLayout_11)
    @doubleSpinBox_inmount.objectName = "doubleSpinBox_inmount"

    @vboxLayout13.addWidget(@doubleSpinBox_inmount)

    @doubleSpinBox_outmount = Qt::DoubleSpinBox.new(@verticalLayout_11)
    @doubleSpinBox_outmount.objectName = "doubleSpinBox_outmount"

    @vboxLayout13.addWidget(@doubleSpinBox_outmount)

    @checkBox_uselim = Qt::CheckBox.new(@page_4)
    @checkBox_uselim.objectName = "checkBox_uselim"
    @checkBox_uselim.geometry = Qt::Rect.new(20, 110, 72, 17)
    @stackedWidget_message.addWidget(@page_4)
    @tabWidget.addTab(@tab_2, Qt::Application.translate("Form", "Message", nil, Qt::Application::UnicodeUTF8))

    @vboxLayout.addWidget(@tabWidget)


    retranslateUi(form)

    @tabWidget.setCurrentIndex(0)
    @messagelist.setCurrentIndex(0)
    @stackedWidget_message.setCurrentIndex(0)


    Qt::MetaObject.connectSlotsByName(form)
    end # setupUi

    def setup_ui(form)
        setupUi(form)
    end

    def retranslateUi(form)
    form.windowTitle = Qt::Application.translate("Form", "EyouClient", nil, Qt::Application::UnicodeUTF8)
    @label_2.text = Qt::Application.translate("Form", "Account", nil, Qt::Application::UnicodeUTF8)
    @label.text = Qt::Application.translate("Form", "Passwd", nil, Qt::Application::UnicodeUTF8)
    @label_3.text = Qt::Application.translate("Form", "Interface Style", nil, Qt::Application::UnicodeUTF8)
    @comboBox_style.insertItems(0, [Qt::Application.translate("Form", "CDE", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "Windows", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "WindowsXP", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "Motif", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "Plastique", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "Cleanlooks", nil, Qt::Application::UnicodeUTF8)])
    @pushButton_login.text = Qt::Application.translate("Form", "Login", nil, Qt::Application::UnicodeUTF8)
    @pushButton_logout.text = Qt::Application.translate("Form", "Logout", nil, Qt::Application::UnicodeUTF8)
    @checkBox_autolog.text = Qt::Application.translate("Form", "Autolog", nil, Qt::Application::UnicodeUTF8)
    @radioButton_in.text = Qt::Application.translate("Form", "Inside", nil, Qt::Application::UnicodeUTF8)
    @radioButton_out.text = Qt::Application.translate("Form", "Outside", nil, Qt::Application::UnicodeUTF8)
    @radioButton_gucas.text = Qt::Application.translate("Form", "Gucas", nil, Qt::Application::UnicodeUTF8)
    @comboBox_method.insertItems(0, [Qt::Application.translate("Form", "mail.gucas.ac.cn", nil, Qt::Application::UnicodeUTF8),
        Qt::Application.translate("Form", "gucas.ac.cn", nil, Qt::Application::UnicodeUTF8)])
    @label_success.text = Qt::Application.translate("Form", "login Success~", nil, Qt::Application::UnicodeUTF8)
    @tabWidget.setTabText(@tabWidget.indexOf(@tab), Qt::Application.translate("Form", "Login", nil, Qt::Application::UnicodeUTF8))
    @pushButton_netstatus.text = Qt::Application.translate("Form", "NetStatus", nil, Qt::Application::UnicodeUTF8)
    @pushButton_person_info.text = Qt::Application.translate("Form", "Person_Info", nil, Qt::Application::UnicodeUTF8)
    @messagelist.setItemText(@messagelist.indexOf(@page), Qt::Application.translate("Form", "BINFO", nil, Qt::Application::UnicodeUTF8))
    @pushButton_passchange.text = Qt::Application.translate("Form", "PassChange", nil, Qt::Application::UnicodeUTF8)
    @pushButton_amountlim.text = Qt::Application.translate("Form", "AmountLim", nil, Qt::Application::UnicodeUTF8)
    @messagelist.setItemText(@messagelist.indexOf(@page_2), Qt::Application.translate("Form", "AOPT", nil, Qt::Application::UnicodeUTF8))
    @label_inmountleft.text = Qt::Application.translate("Form", "Inside", nil, Qt::Application::UnicodeUTF8)
    @label_outmountleft.text = Qt::Application.translate("Form", "Outside", nil, Qt::Application::UnicodeUTF8)
    @label_money.text = Qt::Application.translate("Form", "Waiting for new message", nil, Qt::Application::UnicodeUTF8)
    @label_6.text = Qt::Application.translate("Form", "OldPass", nil, Qt::Application::UnicodeUTF8)
    @label_8.text = Qt::Application.translate("Form", "NewPass", nil, Qt::Application::UnicodeUTF8)
    @label_7.text = Qt::Application.translate("Form", "Confirm", nil, Qt::Application::UnicodeUTF8)
    @pushButton_changepass.text = Qt::Application.translate("Form", "Change", nil, Qt::Application::UnicodeUTF8)
    @pushButton_reset.text = Qt::Application.translate("Form", "Reset", nil, Qt::Application::UnicodeUTF8)
    @label_10.text = Qt::Application.translate("Form", "In", nil, Qt::Application::UnicodeUTF8)
    @label_9.text = Qt::Application.translate("Form", "Out", nil, Qt::Application::UnicodeUTF8)
    @checkBox_uselim.text = Qt::Application.translate("Form", "Use", nil, Qt::Application::UnicodeUTF8)
    @tabWidget.setTabText(@tabWidget.indexOf(@tab_2), Qt::Application.translate("Form", "Message", nil, Qt::Application::UnicodeUTF8))
    end # retranslateUi

    def retranslate_ui(form)
        retranslateUi(form)
    end

    
    def userinit(form)
      @label_success.hide
      @dial_outmount.enabled=false
      @dial_inmount.enabled = false
      @dial_inmount.notchesVisible=true
      @dial_outmount.notchesVisible=true
      @dial_inmount.maximum = 1000
      @dial_inmount.notchTarget=@dial_inmount.maximum/20
      @dial_outmount.maximum = 2000
      @dial_outmount.notchTarget=@dial_outmount.maximum/20
      @passwd.setEchoMode(Qt::LineEdit::Password)
      @radioButton_gucas.checked=true
      @timer_float=Qt::Timer.new
      @horizontalSlider_inmount.maximum=2000
      @horizontalSlider_outmount.maximum=1000
      @doubleSpinBox_inmount.maximum=2000
      @doubleSpinBox_outmount.maximum=1000
      if !fillinc
        stylestring=["CDE","Windows","WindowsXP","Motif","Plastique","Cleanlooks"]
        stylechoose=(stylestring.length*rand).to_i
        @comboBox_style.currentIndex=stylechoose
        style = Qt::StyleFactory.create(stylestring[stylechoose])
        Qt::Application.style = style
      end
      @form=form
      message_mirror
    end
    ############slots##############
    slots 'netstatus()'
    slots 'person_info()'
    slots 'passchange()'
    slots 'amountlim()'
    slots 'userlogin()'
    slots 'userlogout()'
    slots 'floatflag()'
    slots 'changepass()'
    slots 'passreset()'
    slots 'Sliderinmountsetvalue(double)'
    slots 'Slideroutmountsetvalue(double)'
    slots 'SpinBoxinmountsetvalue(int)'
    slots 'SpinBoxoutmountsetvalue(int)'
    slots 'stylechange(int)'
    
        
    ############slots##############
    def message_mirror
        Qt::Object.connect(@pushButton_netstatus,SIGNAL('clicked()'),self,SLOT('netstatus()'))
        Qt::Object::connect(@pushButton_person_info,SIGNAL('clicked()'),self,SLOT('person_info()'))
        Qt::Object::connect(@pushButton_passchange,SIGNAL('clicked()'),self,SLOT('passchange()'))
        Qt::Object::connect(@pushButton_amountlim,SIGNAL('clicked()'),self,SLOT('amountlim()'))
        Qt::Object::connect(@pushButton_login,SIGNAL('clicked()'),self,SLOT('userlogin()'))
        Qt::Object::connect(@pushButton_logout,SIGNAL('clicked()'),self,SLOT('userlogout()'))
        Qt::Object::connect(@timer_float,SIGNAL('timeout()'),self,SLOT('floatflag()'))
        Qt::Object::connect(@pushButton_changepass,SIGNAL('clicked()'),self,SLOT('changepass()'))
        Qt::Object::connect(@pushButton_reset,SIGNAL('clicked()'),self,SLOT('passreset()'))
        Qt::Object::connect(@doubleSpinBox_inmount,SIGNAL('valueChanged(double)'),self,SLOT('Sliderinmountsetvalue(double)'))
        Qt::Object::connect(@doubleSpinBox_outmount,SIGNAL('valueChanged(double)'),self,SLOT('Slideroutmountsetvalue(double)'))
        Qt::Object::connect(@horizontalSlider_inmount,SIGNAL('valueChanged(int)'),self,SLOT('SpinBoxinmountsetvalue(int)'))
        Qt::Object::connect(@horizontalSlider_outmount,SIGNAL('valueChanged(int)'),self,SLOT('SpinBoxoutmountsetvalue(int)')) 
        Qt::Object::connect(@comboBox_style,SIGNAL('currentIndexChanged(int)'),self,SLOT('stylechange(int)'))               
 
        
    end
    def stylechange(index)
      style = Qt::StyleFactory.create(@comboBox_style.currentText)
      Qt::Application.style = style
    end
    def Sliderinmountsetvalue(value)
      @horizontalSlider_inmount.value=value
    end
    def Slideroutmountsetvalue(value)
      @horizontalSlider_outmount.value=value
    end
    def SpinBoxinmountsetvalue(value)
      @doubleSpinBox_inmount.value=value.to_f
    end
    def SpinBoxoutmountsetvalue(value)
      @doubleSpinBox_outmount.value=value.to_f
    end
    def userlogin
        username=@uname.text
        password=@passwd.text
        domain=@comboBox_method.currentText
        if domain.match("mail")!=nil
          domain=2
        else
          domain=1
        end
        if @radioButton_gucas.checked
          typename="\xC1\xAC\xCF\xDF\xB3\xC7\xD3\xF2"
        elsif @radioButton_in.checked
          typename="\xC1\xAC\xCF\xDF\xB9\xFA\xC4\xDA"
        elsif @radioButton_out.checked
          typename="\xC1\xAC\xCF\xDF\xB9\xFA\xBC\xCA"
        end
        if (username=="")||(password=="")
          Qt::MessageBox.new(nil,"INFO Accquired","Missing Input Item!").show
          return false
        end
        if login(username,password,typename,domain)!=false
          init_timerfloat("Login Successfully!")
          netstatus
          if @checkBox_autolog.checked
            recordinc
          elsif File.exist?("inc.dat")
            File.delete("inc.dat")
          end
        else
          init_timerfloat("Login Failed!")
        end
    end
    
    def userlogout
      username=@uname.text
      password=@passwd.text
      domain=@comboBox_method.currentText
      if domain.match("mail")!=nil
        domain=2
      else
        domain=1
      end
      if (username=="")||(password=="")
        Qt::MessageBox.new(nil,"INFO Accquired","Missing Input Item!").show
        return false
      end
      if kickall(username,password,domain)!=false
        init_timerfloat("Logout Successfully!")
      else
        init_timerfloat("Logout Failed!")
      end
      
    end

    
    def init_timerfloat(str)
      @label_success.show
      @label_success.text=str
      @timer_float.stop
      temp=@label_success.geometry
      temp.x=300
      @label_success.geometry=temp
      @timer_float.start(100)
    end
    
    def floatflag            
      temp=@label_success.geometry
      temp.x=temp.x-10
      if temp.x<-100
        @timer_float.stop
        @label_success.hide
      end
      @label_success.geometry=temp    
    end
    
    def incode(str)
      len=str.length-1
      0.upto(len/2) do |i|
        te=str[len-i]
        str[len-i]=str[i]
        str[i]=te
      end
      return str
    end
    
    def recordinc
      username=@uname.text
      password=@passwd.text
      domain=@comboBox_method.currentIndex.to_s
      if @radioButton_gucas.checked
        typename="gucas"
      elsif @radioButton_in.checked
        typename="in"
      elsif @radioButton_out.checked
        typename="out"
      end  
      fi=File.new("inc.dat","w")
      fi.puts incode(Base64.encode64(username+"\n"+password+"\n"+domain+"\n"+typename+"\n"+
      @horizontalSlider_inmount.value.to_s+"\n"+@horizontalSlider_outmount.value.to_s+"\n"+
      @horizontalSlider_inmount.maximum.to_s+"\n"+@doubleSpinBox_outmount.maximum.to_s+"\n"+      
      @checkBox_uselim.checked.to_s+"\n"+@comboBox_style.currentIndex.to_s+"\n"))
      fi.close
    end
    
    def fillinc
      if File.exist?("inc.dat")
        data=Base64.decode64(incode(File.read("inc.dat")))
        data=data.split("\n")
        @uname.text=data[0]
        @passwd.text=data[1]
        @comboBox_method.currentIndex=data[2].to_i
        eval("@radioButton_#{data[3]}.checked=true")
        @checkBox_autolog.checked=true
        @horizontalSlider_inmount.maximum=data[6].to_i
        @horizontalSlider_outmount.maximum=data[7].to_i
        @doubleSpinBox_inmount.maximum=data[6].to_f
        @doubleSpinBox_outmount.maximum=data[7].to_f
        @horizontalSlider_inmount.value=data[4].to_i
        @doubleSpinBox_inmount.value=data[4].to_f
        @horizontalSlider_outmount.value=data[5].to_i
        @doubleSpinBox_outmount.value=data[5].to_f
        if data[8]=="true"
          @checkBox_uselim.checked=true
        end
        @comboBox_style.currentIndex=data[9].to_i
        stylechange(data[9].to_i)
      else
        return false
      end
      
    end
    
    def netstatus
      username=@uname.text
      password=@passwd.text
      domain=@comboBox_method.currentText
      if domain.match("mail")!=nil
        domain=2
      else
        domain=1
      end
      if (username=="")||(password=="")
        Qt::MessageBox.new(nil,"INFO Accquired","Missing Input Item!").show
        return false
      end
      @stackedWidget_message.currentIndex=0
      if @radioButton_gucas.checked
          typename="\xC1\xAC\xCF\xDF\xD0\xA3\xD4\xB0"
      elsif @radioButton_in.checked
          typename="\xC1\xAC\xCF\xDF\xB9\xFA\xC4\xDA"
      elsif @radioButton_out.checked
          typename="\xC1\xAC\xCF\xDF\xB9\xFA\xBC\xCA"
      end
      tempuseamount=useamount(username,password,typename,domain)
      tempgroupmess=viewmygroup(username,password,domain)
      tempremainfee=remainfee(username,password,domain)
      if (tempuseamount==false)||(tempgroupmess==false)||(tempremainfee==false)
        return false
      end
      @horizontalSlider_outmount.maximum=tempgroupmess["outamount"].to_i*1000
      @doubleSpinBox_outmount.maximum=tempgroupmess["outamount"].to_i*1000
      @horizontalSlider_inmount.maximum=tempgroupmess["inamount"].to_i*1000
      @doubleSpinBox_inmount.maximum=tempgroupmess["inamount"].to_i*1000
      
      @dial_inmount.maximum=tempgroupmess["inamount"].to_i*1000
      @dial_inmount.notchTarget=@dial_inmount.maximum/20
      @dial_inmount.setValue(tempuseamount["indownload"].to_i)
      if tempuseamount["indownload"].to_i>tempgroupmess["inamount"].to_i*1000
        @dial_inmount.autoFillBackground=true
      else
        @dial_inmount.autoFillBackground=false
      end
      @label_inmountleft.text="InUse: #{tempuseamount["indownload"]}Mb/#{tempgroupmess["inamount"].to_i}G"
      
      @dial_outmount.maximum=tempgroupmess["outamount"].to_i*1000
      @dial_outmount.notchTarget=@dial_outmount.maximum/20
      @dial_outmount.setValue(tempuseamount["outdownload"].to_i)
      if tempuseamount["outdownload"].to_i>tempgroupmess["outamount"].to_i*1000
        @dial_outmount.autoFillBackground=true
      else
        @dial_outmount.autoFillBackground=false
      end
      @label_outmountleft.text="OutUse: #{tempuseamount["outdownload"]}Mb/#{tempgroupmess["outamount"].to_i}G"
      
      @label_money.text="You have spent: #{tempuseamount["usefee"]},left: #{tempremainfee}.\n"+
      "Extra Inner(Money): #{tempremainfee.to_f/tempgroupmess["infee"].to_f}Mb.\n"+
      "Extra Outer(Money): #{tempremainfee.to_f/tempgroupmess["outfee"].to_f}Mb."
      if @checkBox_uselim.checked==true
        if (tempuseamount["outdownload"].to_i>@horizontalSlider_outmount.value)||(tempuseamount["indownload"].to_i>@horizontalSlider_inmount.value)
          Qt::MessageBox.new(nil,"Autolimit","Amount has overflow!").show
        end
      end
    end
    
    def person_info
      @stackedWidget_message.currentIndex=1
      username=@uname.text
      password=@passwd.text
      domain=@comboBox_method.currentText
      if domain.match("mail")!=nil
        domain=2
      else
        domain=1
      end
      if (username=="")||(password=="")
        Qt::MessageBox.new(nil,"INFO Accquired","Missing Input Item!").show
        return false
      end
      selfdata=viewmyself(username,password,domain)
      if selfdata==false
        return false
      end
      i=0
      utranslatestr=""
      while i<selfdata.length-1 do
        if ((selfdata[i]+selfdata[i+1])!="")&&((selfdata[i]+selfdata[i+1])!="\x09")
          utranslatestr=utranslatestr+selfdata[i]+selfdata[i+1]+"\n"
        end
        i=i+2
      end
      strout=translate(utranslatestr)
      strout=strout.gsub(/\_\_+/,"<p>").gsub(/^\s/,"")
      @textEdit_person_info.html=strout
    end
    
    
    def passchange
      @stackedWidget_message.currentIndex=2
    end
    
    def changepass
      oldpass=@lineEdit_oldpass.text
      newpass=@lineEdit_newpass.text
      confirm=@lineEdit_confirm.text
      if (oldpass=="")||(newpass=="")||(confirm!=newpass)
        return false
      end
      username=@uname.text
      password=@passwd.text
      domain=@comboBox_method.currentText
      if domain.match("mail")!=nil
        domain=2
      else
        domain=1
      end
      if (username=="")||(password=="")
        Qt::MessageBox.new(nil,"INFO Accquired","Missing Input Item!").show
        return false
      end
      if passwdchange(username,oldpass,newpass,domain)==false
        return false
      end
      Qt::MessageBox.new(nil,"Successful","Password change to #{newpass}!").show
      passreset
    end
   
    def passreset
      @lineEdit_oldpass.text=""
      @lineEdit_newpass.text=""
      @lineEdit_confirm.text=""
    end
  
    
    def amountlim
      @stackedWidget_message.currentIndex=3      
    end
    
    
end


if $0 == __FILE__
    a = Qt::Application.new(ARGV)
    #Qt::TextCodec::setCodecForLocale(Qt::TextCodec::codecForName("GB2312"))
    u = Ui_Form.new
    w = Qt::Widget.new
    u.setupUi(w)
    u.userinit(w)
    w.show
    a.exec
end
